home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Utilities / Miscellaneous / Tim's Widgets 1.2 / Tim's Widgets Docu⁄ReadMe < prev   
Text File  |  1995-05-23  |  9KB  |  87 lines

  1. Tim’s Widgets 1.2
  2. © 1994-1995, Two Bits Worth, Inc.
  3.  
  4. Shareware:  $20.00
  5.  
  6. And now a word from the lawyers…
  7. This software is a copyrighted work, it is not and never has been in the public domain.  You may use this software to evaluate its usefulness if your evaluation is strictly for private and non-commercial use.  You may give a copy of this software to another individual if you include the software's README file and all other related software materials.  This software may not be sold, incorporated into other products, or in anyway commercially exploited without prior written consent of the author.  If you want to continue using this software beyond your evaluation, please send $20.00 to the address listed below.
  8.  
  9. TWO BITS WORTH MAKES NO WARRANTIES, EITHER EXPRESS OR IMPLIED, REGARDING THE SOFTWARE PACKAGE DESCRIBED BELOW, ITS MERCHANTABILITY, OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.  YOU ASSUME THE ENTIRE RISK OF USING THE SOFTWARE, INCLUDING ANY LOSS OR DAMAGE OF DATA OR MATERIALS RESULTING FROM ITS USE.  THE EXCLUSION OF IMPLIED WARRANTIES IS NOT PERMITTED BY SOME STATES.  THE ABOVE EXCLUSION MAY NOT APPLY TO YOU.  THIS WARRANTY PROVIDES YOU WITH SPECIFIC LEGAL RIGHTS.  THERE MAY BE OTHER RIGHTS YOU HAVE WHICH VARY FROM STATE TO STATE.
  10.  
  11. Written by Tim Herzog
  12. Produced by Two Bits Worth
  13. 778 Hague Avenue
  14. Saint Paul, MN  55104
  15. (612) 227-2920
  16. Internet:  herzo005@gold.tc.umn.edu
  17. Make checks payable to Two Bits Worth
  18.  
  19. Background
  20.  
  21. Tim’s Widgets is a collection of utility functions which (I think) are very useful, especially for hackers and programmer types.  Each by itself does not warrant a full-blown program, so I put all these tidbits into one program.  As I discover (or have suggested to me) other knick-knacky types of functions, I’ll probably add them to TW’s feature set.
  22.  
  23. TW runs native on the PowerMac.
  24.  
  25. Text Translator:
  26.  
  27. This is a text processing feature that covers a lot of ground.  Basically, it reads in a text file or set of text files, performs processing, and writes out the results.  When you choose Text Translator from the menu, you get the File Open dialog box.  You can choose an entire folder by clicking the button with the name of the current folder, or you can choose just one file by selecting the file.  TW displays the current Text Translator options in Geneva 9-point.  You can change the current translator preferences by clicking the Preferences button (this is the same as choosing Text Translator from the Preferences popup menu in the File menu).
  28.  
  29. Text Translator Preferences:
  30.  
  31. Output Format:  Macintosh, Dos/Windows.  Choose the output format for the processed files.
  32.  
  33. Remove ¶ Returns:  If checked, TW will replace single paragraph returns with a space and double paragraph returns with a single paragraph return.  This is useful for people who pull files off the Internet where the author’s system ‘conveniently’ put in a hard return at the end of every line, which makes reformatting a real hassle.  BE CAREFUL!  This option can REALLY mess up files for which it makes no sense, such as source code files and files that have already been run once with this option.  You’ll end up with one BIG LONG line!
  34.  
  35. Process Subfolders:  If checked and you chose a folder, TW will also process files in subfolders.  By the way, this option is the same as the one in Line Count Preferences, so if you check it once here, it will be checked in Line Count Preferences as well.
  36.  
  37. Retain File Dates:  Don’t change the date on the processed files.
  38.  
  39. Copy to New Files:  If checked, TW will copy results of each file to a new file.  The new file will have the same name as the old file with “ copy” appended on the end.  If such a file already exists, TW will warn you and ask you if you want to overwrite it.  If this option is not checked, TW will write results to the original file, OVERWRITING the original contents.  BE CAREFUL with this option!
  40.  
  41. Process All Files:  Process all files, whether or not the Macintosh system recognizes them as text files (TW never tries to process applications).  This is handy for files that you’ve ported from DOS where the system may not recognize them as text.  This option is the same as the one in Line Count Preferences, so if you check it once here, it will be checked in Line Count Preferences as well.
  42.  
  43. Skip Warnings:  If checked, TW will not warn you before embarking on destructive behavior; that is, writing results to files that already exist.  Note that this option is automatically ON if you are running TW via AppleScript.
  44.  
  45. Line Counter:  This feature counts lines of text in a file or set of files and displays the results in a window.  When you choose Line Counter from the menu, you get the File Open dialog box (similar to the one for Text Translator).  You can choose an entire folder by clicking the button with the name of the current folder, or you can choose just one file by selecting the file.  TW displays the current Line Counter options in Geneva 9-point.  You can change the current line count preferences by clicking the Preferences button (this is the same as choosing Line Counter from the Preferences popup menu in the File menu).
  46.  
  47. Line Counter Preferences:
  48.  
  49. Perform Count On:  All Text Files, .c Files Only, .h Files Only, .c And .h Files Only:  This option sets which files will be counted when choosing a folder or set of folders. 
  50.  
  51. Process Subfolders:  same as the identical option in Text Translator Preferences (see above).
  52.  
  53. Process All Files:  same as the identical option in Text Translator Preferences (see above).
  54.  
  55. Resource to PICT File:  This feature lets you select a file with a PICT resource in it, previews the file so you can select a PICT resource, and then copies the selected PICT resource to a PICT file, which can be edited by any graphic program that supports PICT.
  56.  
  57. PICT File to Resource:  This feature lets you select a PICT file and then copies it as a PICT resource to a designated resource file.  You can pick whether the resource file is a new file or an existing file.
  58.  
  59. Preferences:  Lets you set preferences for Text Translator and Line Counter (see the corresponding features above).
  60.  
  61. Postal Calculator:  Displays a window that lets you calculate how many stamps to use depending on how much postage you need.  Enter the denominations of stamps you have available in the “Stamp Denominations” field, separating them with commas.  Enter how much postage you need in the “Postage Needed” field.  You can enter simple math equations into this field, like (.50 * 2) + .45 + .39.  Enter the maximum number of stamps you want to use in the “Max. Number of Stamps” field.  This is included so that if, for instance, you have 3-cent stamps, TW doesn’t end up using 14 of them trying to get as accurate as possible.  When you’re all set, click Compute.
  62.  
  63. Suitcase ID <-> Varityper ID:  This feature is extremely obscure, but here it is.  Suitcase is a utility by Symantec (formerly by Fifth Dimension) that lets you manage fonts.  Varityper makes a set of utilities that give you a lot of information about the fonts in your system.  At least, I think they still do, I’m not sure.  Anyway, both programs let you generate files listing font ID numbers and font names for the purposes of diagnosing and correcting font conflicts between different systems.  This feature lets you convert font ID files from one format to the other.  There, I told you it was obscure.
  64.  
  65. Anyway, when you select this feature from the menu, TW asks you to select a font ID file.  Choose a file in either format, and TW converts it to the other format.
  66.  
  67.  
  68.  
  69. AppleEvent Support:  TW fully supports AppleEvents, including dragging and dropping of objects on the TW program icon.  Any text file can be dropped onto TW’s icon and TW will perform a Line Count on that file (as if you had selected the file with the Line Count item in the File menu).  You can also drag and drop the icon’s of folders or disks.
  70.  
  71. Running TW with AppleScript:  Both Text Translator and Line Count can be run via AppleScript.  The syntax for running TW via AppleScript is as follows:
  72.  
  73. texttrans  file [output mac|dos] [subfolders bool] [savedate bool] [savecopy bool] [shortparas bool] [allfiles bool]
  74.  
  75. This command conducts a Text Translator session.  “file” can be either a file name or a path to a folder.  The rest of the parameters are optional and correspond to the options in the Text Translator Preferences dialog box.  If any parameter is missing, TW uses the original setting from the Text Translator Preferences dialog box.
  76.  
  77. NOTE:  Text Translator runs with “Skip Warnings” ON when driven via AppleScript (since there’s a good change that TW will be running in the background).
  78.  
  79. linecount  file [files all|c|h|ch] [subfolders bool] [allfiles bool]
  80.  
  81. This command conducts a Line Count session.  “file” can be either a file name or a path to a folder.  The rest of the parameters are optional and correspond to the options in the Line Count Preferences dialog box.  If any parameter is missing, TW uses the original setting from the Line Count Preferences dialog box.
  82.  
  83. clear linecount
  84.  
  85. This command clears the contents of the Line Count display window.
  86.  
  87. TW comes with a sample AppleScript for running itself in conjunction with THINK C to count the lines of code in a project.  Place “Line Count” in your “(AppleScripts)” folder to make the AppleScript appear in the AppleScript menu under THINK C.